/**
 * 安卓白金英雄坛制作组 <br>
 * 文件名：Rune.java <br>
 * 创建时间：2014-6-29 下午17:19:88 <br>
 * 所属项目：GmudEX <br>
 * @author ubun <br>
 */
package lostland.gmud.exv2.data;


/**
 * 类名：Rune <br>
 * 说明：物品符文。。
 *
 * @author ubun
 */
public class Rune {

	/**
	 * 符文前缀
	 * <h2>[0]通用符文</h2>
	 * <pre>
	 * [0] 加力量
	 * [1] 加敏捷
	 * [2] 加悟性
	 * [3] 加根骨
	 * </pre>
	 * <h2>[1]武器符文</h2>
	 * <pre>
	 * [0] 命中后减敌人攻击
	 * [1] 命中后减敌人防御
	 * [2] 命中后减敌人命中
	 * [3] 命中后减敌人闪避
	 * [4] 命中后一定概率敌人呆若木鸡
	 * [5] 命中后一定概率禁止敌人使用绝招
	 * [6] 命中后一定概率令敌人生命与体力相等
	 * </pre>
	 * <h2>[2]装备符文</h2>
	 * <pre>
	 * [0]加生命上限（20/40/60/80/100）
	 * [1]加内力上限（20/40/60/80/100）
	 * [2]加命中（5/10/15/20/25）
	 * [3]加闪避（5/10/15/20/25）
	 * </pre>
	 */
	public static final String runes[][][] = new String[][][]{
			{
					{"合宇", "合渊", "合灵", "合玄", "合尊"},
					{"人宇", "人渊", "人灵", "人玄", "人尊"},
					{"地宇", "地渊", "地灵", "地玄", "地尊"},
					{"天宇", "天渊", "天灵", "天玄", "天尊"}
			},
			{
					{"泻力", "暗光", "混沌", "狻猊", "熊罴"},
					{"纯钧", "湛卢", "干将", "莫邪", "龙泉"},
					{"含光", "承影", "宵练", "青萍", "赤霄"},
					{"蜉蝣", "怪力", "绿波", "蔓陀", "鹤顶"},
					{"七星", "鱼肠", "渊虹", "巨阙", "太阿"},
					{"弱水", "戏侯", "皓矢", "演舞", "天仙"},
					{"帝喾", "皋陶", "颛顼", "轩辕", "伏羲"}
			},
			{
					{"绿野", "灵泉", "天芝", "玉露", "蟠桃"},
					{"莲华", "孔雀", "昼虎", "夕象", "夜凯"},
					{"飞火", "绝世", "笑颦", "鬼门", "麒麟"},
					{"阿月", "晦明", "沉水", "一品", "绥靖"}
			}
	};

	public static final int runes_value[][] = new int[][]{
			{
					2, 2, 2, 2
			},
			{
					2, 2, 2, 2, 5, 6, 7
			},
			{
					20, 20, 5, 5
			}
	};

	public int a0;
	public int a1;
	public int a2;

	public String getStr() {
		return runes[a0][a1][a2];
	}

	public String getDesc() {
		String value = String.valueOf(getValue());
		switch (a0) {
			case 0:
				switch (a1) {
					case 0:
						return "增加" + value + "点力量";
					case 1:
						return "增加" + value + "点敏捷";
					case 2:
						return "增加" + value + "点悟性";
					case 3:
						return "增加" + value + "点根骨";
				}
			case 1:
				switch (a1) {
					case 0:
						return "命中后减敌人" + value + "点攻击";
					case 1:
						return "命中后减敌人" + value + "点防御";
					case 2:
						return "命中后减敌人" + value + "点命中";
					case 3:
						return "命中后减敌人" + value + "点闪避";
					case 4:
						return "命中后" + value + "%概率使敌人呆若木鸡";
					case 5:
						return "命中后" + value + "%概率禁止敌人使用绝招";
					case 6:
						return "命中后" + value + "%概率令敌人生命与体力相等";
				}
			case 2:
				switch (a1) {
					case 0:
						return "增加" + value + "点生命上限";
					case 1:
						return "增加" + value + "点内力上限";
					case 2:
						return "增加" + value + "点命中";
					case 3:
						return "增加" + value + "点回避";
				}
		}
		return "";
	}

	/**
	 * 获取符文增加的属性值。
	 *
	 * @return 符文值
	 */
	public int getValue() {
		return runes_value[a0][a1] * (a2 + 1);
	}

	/**
	 * @param a0 0为通用符文，1为武器符文，2为装备符文
	 * @param a1 符文类型
	 * @param a2 符文等级
	 */
	public Rune(int a0, int a1, int a2) {
		this.a0 = a0;
		this.a1 = a1;
		this.a2 = a2;
	}

	/* （非 Javadoc）
	 * @see java.lang.Object#equals(java.lang.Object)
	 */
	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		Rune other = (Rune) obj;
		if (a0 != other.a0)
			return false;
		if (a1 != other.a1)
			return false;
		if (a2 != other.a2)
			return false;
		return true;
	}

	/* （非 Javadoc）
	 * @see java.lang.Object#hashCode()
	 */
	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + a0;
		result = prime * result + a1;
		result = prime * result + a2;
		return result;
	}


//	public static final String rune_plus[] = new String[]{
//		"锯齿","开光","破甲","狼牙","罗刹","修罗","菩提","金光","雾光","地火",
//		"烈风","巨索","青冥","白虹","青虹","红羽","金蛇","紫霞","碧水","观日",
//		"凌虚","秋骊","松鹤","水寒","雪霁","凤翔","龙翔","太阿","渊虹","天问",
//		"胜邪","巨阙","宵练","青萍","赤霄","含光","承影","纯钧","湛卢","干将",
//		"莫邪","七星","鱼肠","龙泉","三才","五圣","乱神","霸王","天龙","帝喾",
//		"昆仑","炼狱","浩然","天微","紫薇","昊天","崆峒","无极","嫘祖","盘古",
//		"东皇","皋陶","颛顼","轩辕","蚩尤","神农","女娲","伏羲","仙剑","神剑"
//	};

//	/**
//	 * @param 第二符文
//	 * @param rune[0]中每10一个等级，达到10*x时随机出现[0-5][x-1]中的一个符文 <br>
//	 * [0] 命中后减敌人攻击 (5/10/15/20/25) <br>
//	 * [1] 命中后减敌人防御 <br>
//	 * [2] 命中后减敌人命中 <br>
//	 * [3] 命中后减敌人闪避 <br>
//	 * [4] 命中后一定概率敌人呆若木鸡 <br>
//	 * [5] 命中后一定概率禁止敌人使用绝招 <br>
//	 * [6] 命中后一定概率令敌人生命与体力相等 <br>
//	 */
//	public static final String rune_weapon[][] = new String[][]{
//		{"泻力","暗光","混沌","狻猊","熊罴"},
//		{"飞火","绝世","笑颦","鬼门","麒麟"},
//		{"绿野","灵泉","天芝","玉露","蟠桃"},
//		{"蜉蝣","怪力","绿波","蔓陀","鹤顶"},
//		{"阿月","晦明","沉水","一品","绥靖"},
//		{"弱水","戏侯","皓矢","演舞","天仙"},
//		{"莲华","孔雀","昼虎","夕象","夜凯"},
//	};
//
//
//	/**
//	 * @param 第三符文
//	 * @param [0-3] 属性+5 (力量/敏捷/悟性/根骨) <br>
//	 * [4-7] 属性+15 <br>
//	 * [8-11] 属性+25 <br>
//	 * [12-15] 属性+35
//	 */
//	public static final String rune_attrib[] = new String[] {
//		"合宇","合渊","合灵","合玄",
//		"人宇","人渊","人灵","人玄",
//		"地宇","地渊","地灵","地玄",
//		"天宇","天渊","天灵","天玄",
//	};


}
